﻿using System;
using System.Web;
using System.Web.SessionState;

namespace cludg.Web.Core.Notifications.Application
{
	public class ApplicationEventArgs : EventArgs
	{
		public HttpApplicationState Application { get; set;}
	}

	public class ApplicationErrorEventArgs : ApplicationEventArgs
	{
		public Exception Error { get; set; }
	}

	public class SessionEventArgs : ApplicationEventArgs
	{
		public HttpSessionState Session { get; set; }
	}

	public class RequestEventArgs : ApplicationEventArgs
	{
		public HttpRequest Request { get; set; }
	}

	public interface IApplicationNotifier
	{
		event EventHandler<ApplicationEventArgs> ApplicationStart;
		event EventHandler<ApplicationEventArgs> ApplicationEnd;
		event EventHandler<ApplicationErrorEventArgs> ApplicationError;
		event EventHandler<SessionEventArgs> SessionStart;
		event EventHandler<SessionEventArgs> SessionEnd;
		event EventHandler<RequestEventArgs> BeginRequest;
		event EventHandler<RequestEventArgs> EndRequest;
	}
}
